<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>审核银行卡认证</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
{include file="public/css"}
{include file="public/js"}
</head>
<body>
<!-- 后台面包导航 -->
{:get_admin_breadcrumb()}

<blockquote class="layui-elem-quote">审核银行卡认证</blockquote>
<div class=""  style="padding:20px">


<form class="layui-form" action="" method="post" >
              <div class="layui-form-item">
                <label class="layui-form-label" style="width:100px;">申请用户</label>
                <div class="layui-input-inline">
                   <div class="layui-form-mid layui-word-aux">{$CertificationBank.username}</div>
                </div>
              </div> 

              <div class="layui-form-item">
                <label class="layui-form-label" style="width:100px;">帐号类型</label>
                <div class="layui-input-inline">
                   <div class="layui-form-mid layui-word-aux">{if $CertificationBank.bank_type ==1}对私{elseif $CertificationBank.bank_type ==2}对公{/if}</div>
                </div>
              </div>

              <div class="layui-form-item">
                <label class="layui-form-label" style="width:100px;">开户银行</label>
                <div class="layui-input-inline">
                  <div class="layui-form-mid layui-word-aux">{$CertificationBank.bank}</div>
                </div>
              </div>

              <div class="layui-form-item">
                <label class="layui-form-label" style="width:100px;">开户网点</label>
                <div class="layui-input-inline">
                 <div class="layui-form-mid layui-word-aux">{$CertificationBank.bank_branch}</div>
                </div>
              </div>

              <div class="layui-form-item">
                <label class="layui-form-label" style="width:100px;">收款户名</label>
                <div class="layui-input-inline">
                  <div class="layui-form-mid layui-word-aux">{$CertificationBank.bank_realname}</div>
                </div>
              </div>    
               <div class="layui-form-item">
                <label class="layui-form-label" style="width:100px;">收款账号</label>
                <div class="layui-input-inline">
                 <div class="layui-form-mid layui-word-aux">{$CertificationBank.bank_account}</div>
                </div>
              </div>                       
              <div class="layui-form-item">
                <label class="layui-form-label" style="width:100px;">认证状态</label>
                <div class="layui-input-inline">
                    <div class="layui-form-mid layui-word-aux">
                    {:audit_status($CertificationBank.status)}
                    </div>
                </div>
              </div>
{if $CertificationBank.status != 1}
            <div class="layui-form-item">
                <label class="layui-form-label" style="width:100px;">失败原因</label>
                <div class="layui-input-inline">
                   <textarea name="desc" placeholder="失败原因" class="layui-textarea" {if $CertificationBank.status != 0} disabled {/if}>{$CertificationBank.reason}</textarea>
                </div>
            </div>
{/if}      
              <div class="layui-form-item">
                <label class="layui-form-label" style="width:100px;"></label>
                <div class="layui-input-inline">
                  {if $CertificationBank.status == 0}
                 <button class="layui-btn layui-btn-normal" lay-submit lay-filter="pass" id="pass">通 过</button>
                 <button class="layui-btn layui-btn-danger" lay-submit lay-filter="refuse" id="refuse">失 败</button> 
                  {/if}
                <button class="layui-btn layui-btn-primary"  onclick="javascript:history.go(-1);">返 回</button>
                </div>
              </div>
            
</form>
</div>

<script>

$(function(){
  $("#pass").on("click",function(){
          $.post("{:url('certificationBank/pass')}",{type:'pass'},function(json){
              if(json.code == 0){
                layer.msg(json.msg);
              }else{
                layer.msg(json.msg);
              }
        });
  });


  $("#refuse").on("click",function(){

        $.post("{:url('certificationBank/refuse')}",{type:'refuse'},function(json){
              if(json.code == 0){
                layer.msg(json.msg);
              }else{
                layer.msg(json.msg);
              }
        });
  }

});


</script>

</body>

</html>